home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / xml / gnome / xslt / docbook / html / db2html-refentry.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2009-03-17  |  8.2 KB  |  229 lines

  1. <?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
  2. <!--
  3. This program is free software; you can redistribute it and/or modify it under
  4. the terms of the GNU Lesser General Public License as published by the Free
  5. Software Foundation; either version 2 of the License, or (at your option) any
  6. later version.
  7.  
  8. This program is distributed in the hope that it will be useful, but WITHOUT
  9. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  11. details.
  12.  
  13. You should have received a copy of the GNU Lesser General Public License
  14. along with this program; see the file COPYING.LGPL.  If not, write to the
  15. Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  16. 02111-1307, USA.
  17. -->
  18.  
  19. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  20.                 xmlns:set="http://exslt.org/sets"
  21.                 xmlns="http://www.w3.org/1999/xhtml"
  22.                 exclude-result-prefixes="set"
  23.                 version="1.0">
  24.  
  25. <!--!!==========================================================================
  26. DocBook to HTML - Reference Pages
  27. :Requires: db-chunk db-title db2html-inline db2html-division db2html-xref gettext
  28.  
  29. REMARK: Describe this module. Talk about refenty and friends
  30. -->
  31.  
  32. <!--#% db2html.division.div.content.mode -->
  33.  
  34.  
  35. <!-- == Matched Templates == -->
  36.  
  37. <!-- = manvolnum = -->
  38. <xsl:template match="manvolnum">
  39.   <xsl:call-template name="l10n.gettext">
  40.     <xsl:with-param name="msgid" select="'manvolnum.format'"/>
  41.     <xsl:with-param name="node" select="."/>
  42.     <xsl:with-param name="format" select="true()"/>
  43.   </xsl:call-template>
  44. </xsl:template>
  45.  
  46. <!-- = refentry = -->
  47. <xsl:template match="refentry">
  48.   <xsl:param name="depth_in_chunk">
  49.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  50.   </xsl:param>
  51.   <xsl:param name="depth_of_chunk">
  52.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  53.   </xsl:param>
  54.   <xsl:call-template name="db2html.division.div">
  55.     <xsl:with-param name="title_content">
  56.       <xsl:call-template name="db.title">
  57.         <xsl:with-param name="node" select="."/>
  58.       </xsl:call-template>
  59.     </xsl:with-param>
  60.     <xsl:with-param name="divisions" select="refsynopsisdiv | refsection | refsect1"/>
  61.     <xsl:with-param name="callback" select="true()"/>
  62.     <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  63.     <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  64.   </xsl:call-template>
  65. </xsl:template>
  66.  
  67. <!-- = refentry % db2html.division.div.content.mode = -->
  68. <xsl:template mode="db2html.division.div.content.mode" match="refentry">
  69.   <xsl:param name="depth_in_chunk">
  70.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  71.   </xsl:param>
  72.   <xsl:param name="depth_of_chunk">
  73.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  74.   </xsl:param>
  75.   <div class="refnamedivs">
  76.     <xsl:apply-templates select="refnamediv">
  77.       <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk + 1"/>
  78.       <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  79.     </xsl:apply-templates>
  80.   </div>
  81. </xsl:template>
  82.  
  83. <!-- = refdescriptor = -->
  84. <xsl:template match="refdescriptor">
  85.   <xsl:call-template name="db2html.inline"/>
  86. </xsl:template>
  87.  
  88. <!-- = refname = -->
  89. <xsl:template match="refname">
  90.   <xsl:call-template name="db2html.inline"/>
  91. </xsl:template>
  92.  
  93. <!-- = refnamediv = -->
  94. <xsl:template match="refnamediv">
  95.   <xsl:param name="depth_in_chunk">
  96.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  97.   </xsl:param>
  98.   <xsl:param name="depth_of_chunk">
  99.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  100.   </xsl:param>
  101.   <div class="block refnamediv">
  102.     <xsl:call-template name="db2html.anchor"/>
  103.     <xsl:choose>
  104.       <xsl:when test="refdescriptor">
  105.         <xsl:apply-templates select="refdescriptor"/>
  106.       </xsl:when>
  107.       <xsl:otherwise>
  108.         <xsl:for-each select="refname">
  109.           <xsl:if test="position() != 1">
  110.             <xsl:call-template name="l10n.gettext">
  111.               <xsl:with-param name="msgid" select="', '"/>
  112.             </xsl:call-template>
  113.           </xsl:if>
  114.           <xsl:apply-templates select="."/>
  115.         </xsl:for-each>
  116.       </xsl:otherwise>
  117.     </xsl:choose>
  118.     <xsl:call-template name="l10n.gettext">
  119.       <xsl:with-param name="msgid" select="' ‚Äî '"/>
  120.     </xsl:call-template>
  121.     <xsl:apply-templates select="refpurpose"/>
  122.   </div>
  123.   <!-- FIXME: what to do with refclass? -->
  124. </xsl:template>
  125.  
  126. <!-- = refpurpose = -->
  127. <xsl:template match="refpurpose">
  128.   <xsl:call-template name="db2html.inline"/>
  129. </xsl:template>
  130.  
  131. <!-- = refsect1 = -->
  132. <xsl:template match="refsect1">
  133.   <xsl:param name="depth_in_chunk">
  134.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  135.   </xsl:param>
  136.   <xsl:param name="depth_of_chunk">
  137.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  138.   </xsl:param>
  139.   <xsl:call-template name="db2html.division.div">
  140.     <xsl:with-param name="divisions" select="refsect2"/>
  141.     <xsl:with-param name="info" select="refsect1info"/>
  142.     <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  143.     <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  144.     <xsl:with-param name="chunk_divisions" select="false()"/>
  145.   </xsl:call-template>
  146. </xsl:template>
  147.  
  148. <!-- = refsect2 = -->
  149. <xsl:template match="refsect2">
  150.   <xsl:param name="depth_in_chunk">
  151.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  152.   </xsl:param>
  153.   <xsl:param name="depth_of_chunk">
  154.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  155.   </xsl:param>
  156.   <xsl:call-template name="db2html.division.div">
  157.     <xsl:with-param name="divisions" select="refsect3"/>
  158.     <xsl:with-param name="info" select="refsect2info"/>
  159.     <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  160.     <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  161.     <xsl:with-param name="chunk_divisions" select="false()"/>
  162.   </xsl:call-template>
  163. </xsl:template>
  164.  
  165. <!-- = refsect3 = -->
  166. <xsl:template match="refsect3">
  167.   <xsl:param name="depth_in_chunk">
  168.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  169.   </xsl:param>
  170.   <xsl:param name="depth_of_chunk">
  171.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  172.   </xsl:param>
  173.   <xsl:call-template name="db2html.division.div">
  174.     <xsl:with-param name="divisions" select="/false"/>
  175.     <xsl:with-param name="info" select="refsect3info"/>
  176.     <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  177.     <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  178.     <xsl:with-param name="chunk_divisions" select="false()"/>
  179.   </xsl:call-template>
  180. </xsl:template>
  181.  
  182. <!-- = refsection = -->
  183. <xsl:template match="refsection">
  184.   <xsl:param name="depth_in_chunk">
  185.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  186.   </xsl:param>
  187.   <xsl:param name="depth_of_chunk">
  188.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  189.   </xsl:param>
  190.   <xsl:call-template name="db2html.division.div">
  191.     <xsl:with-param name="divisions" select="refsection"/>
  192.     <xsl:with-param name="info" select="refsectioninfo"/>
  193.     <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  194.     <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  195.     <xsl:with-param name="chunk_divisions" select="false()"/>
  196.   </xsl:call-template>
  197. </xsl:template>
  198.  
  199. <!-- = refsynopsisdiv = -->
  200. <xsl:template match="refsynopsisdiv">
  201.   <xsl:param name="depth_in_chunk">
  202.     <xsl:call-template name="db.chunk.depth-in-chunk"/>
  203.   </xsl:param>
  204.   <xsl:param name="depth_of_chunk">
  205.     <xsl:call-template name="db.chunk.depth-of-chunk"/>
  206.   </xsl:param>
  207.   <xsl:choose>
  208.     <xsl:when test="not(title)">
  209.       <xsl:call-template name="db2html.division.div">
  210.         <xsl:with-param name="title_content">
  211.           <xsl:call-template name="l10n.gettext">
  212.             <xsl:with-param name="msgid" select="'Synopsis'"/>
  213.           </xsl:call-template>
  214.         </xsl:with-param>
  215.         <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  216.         <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  217.       </xsl:call-template>
  218.     </xsl:when>
  219.     <xsl:otherwise>
  220.       <xsl:call-template name="db2html.division.div">
  221.         <xsl:with-param name="depth_in_chunk" select="$depth_in_chunk"/>
  222.         <xsl:with-param name="depth_of_chunk" select="$depth_of_chunk"/>
  223.       </xsl:call-template>
  224.     </xsl:otherwise>
  225.   </xsl:choose>
  226. </xsl:template>
  227.  
  228. </xsl:stylesheet>
  229.